//
//  UsefulTableViewCell.m
//  NineGroupProject
//
//  Created by dllo on 15/12/28.
//  Copyright © 2015年 lushan. All rights reserved.
//

#import "UsefulTableViewCell.h"
#import "LabelTableViewCell.h"
@implementation UsefulTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}


-(void)createSubViews{
    self.usefulL = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, WIDTH - 20 * WID, 1000)];
    self.usefulL.numberOfLines = 0;
    [self.contentView addSubview:self.usefulL];
}

-(void)setUserfulText:(NSString *)userfulText{
    self.usefulL.text = userfulText;
    CGFloat height = [LabelTableViewCell heightForContent:userfulText];
    CGRect tempFrame = self.usefulL.frame;
    tempFrame.size.height = height;
    self.usefulL.frame = tempFrame;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
